package com.plusjun.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.plusjun.common.to.mq.SeckillOrderTO;
import com.plusjun.common.utils.PageUtils;
import com.plusjun.gulimall.order.entity.OrderEntity;
import com.plusjun.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author jiajiajun
 * @email ${email}
 * @date 2020-05-13 19:27:52
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);


    /**
     * 订单确认页返回需要用的数据
     * @return
     */
    OrderConfirmVO confirmOrder() throws ExecutionException, InterruptedException;

    /**
     * 下单实现
     * @param orderSubmitVO
     * @return
     */
    SubmitOrderResponseVO submitOrder(OrderSubmitVO orderSubmitVO) ;

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItems(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTO entity);
}

